package com.chat.api;


//import org.activiti.spring.boot.SecurityAutoConfiguration;
import org.activiti.spring.boot.SecurityAutoConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;

//@SpringBootApplication(exclude = SecurityAutoConfiguration.class)
@SpringBootApplication(exclude = SecurityAutoConfiguration.class)
@ComponentScan(basePackages="com.chat")
@ServletComponentScan(basePackages = "com.chat.api.listener")
//继承SpringBootServletInitializer可以打成war包
public class MyWebApplication extends SpringBootServletInitializer {//打jar包
    public static void main(String[] args) {
        SpringApplication.run(MyWebApplication.class, args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(MyWebApplication.class);
    }
//    private static Class<MyWebApplication> applicationClass = MyWebApplication.class;
}
